# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>

pkgname=tree-sitter
pkgver=0.20.10
pkgrel=2
pkgdesc='Incremental parsing library'
arch=('loong64' 'x86_64')
url='https://github.com/tree-sitter/tree-sitter'
license=('MIT')
provides=('libtree-sitter.so')
makedepends=('git')
source=("git+$url.git#commit=c51896d32dcc11a38e41f36e3deb1a6a9c4f4b14")
b2sums=('SKIP')

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" PREFIX=/usr install

  install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}

